package com.example.sourcesprng.jdk8._stream;

import java.util.List;

public class StreamTest01 {
    public static void main(String[] args) {

        List<String> list = List.of("张无忌", "周芷若", "赵敏", "小昭", "张三丰");
        List<String> list1 = list.stream().filter(name -> name.startsWith("张"))
                .filter(name -> name.length() == 3)
                .toList();
        list1.forEach(System.out::println);
    }
}
